/*
 * CompositFeature.h
 *
 *  Created on: Feb 23, 2011
 *      Author: johang
 */

#ifndef CompositFeature_H_
#define CompositFeature_H_


#include "Feature.h"
#include "NormalSumFeature.h"
#include "ColourSumFeature.h"
#include "PosSumFeature.h"
#include "CompositFeature.h"
#include "Log.h"
#include <vector>
#include <map>

namespace findobject {
class CompositFeature : public Feature
{
  public:

    Feature ** features;
    int nr_features;
    CompositFeature(int featureFlags);
    ~CompositFeature();
    void
    getResponse(float * output, Point ** points, int x, int y, int * divi);
    /*
     * Set various features that will be used to compute the feature response vector.
     * Each feature selected will be concatenated in the feature response vector */
    void
    setFeatureTypes(int featureFlags);

  private:
    std::vector<int> m_allFeatureTypes;
    std::vector<int> m_usedFeatureTypes;
    std::map<int, Feature*> m_featureBase;

    void initAllFeatures();
};

};
#endif
